package LeetcodeTest_twenty_two;
//62.不同路径
public class uniquePaths
{
    public static void main(String[] args)
    {
        System.out.println(Solution.uniquePaths(7,3));
    }
}
class Solution
{
    public static int uniquePaths(int m, int n)
    {
        int i,j;
        int dp[][]=new int[m][n];
        for(i=0;i<m;i++)
        {
            for(j=0;j<n;j++)
            {
                if(i==0 || j==0)
                    dp[i][j]=1;
                else
                    dp[i][j]=dp[i-1][j]+dp[i][j-1];
            }
        }
        return dp[m-1][n-1];
    }
}